package c.c.b.b.d;

import android.graphics.Bitmap;
import c.c.b.b.f.p;

/* compiled from: ImageLoader */
public class i implements c.c.b.b.f.p.a<Bitmap> {
    public final /* synthetic */ String a;
    public final /* synthetic */ k b;

    /* compiled from: ImageLoader */
    public class a implements Runnable {
        public final /* synthetic */ p a;

        public a(p pVar) {
            this.a = pVar;
        }

        public void run() {
            i iVar = i.this;
            k kVar = iVar.b;
            String str = iVar.a;
            p pVar = this.a;
            kVar.d.a(str, (Bitmap) pVar.a);
            c.c.b.b.d.k.a aVar = (c.c.b.b.d.k.a) kVar.e.remove(str);
            if (aVar != null) {
                aVar.b = (Bitmap) pVar.a;
                aVar.a = pVar;
                kVar.f.put(str, aVar);
                kVar.g.postDelayed(new j(kVar, str), (long) kVar.c);
            }
        }
    }

    /* compiled from: ImageLoader */
    public class b implements Runnable {
        public final /* synthetic */ p a;

        public b(p pVar) {
            this.a = pVar;
        }

        public void run() {
            i iVar = i.this;
            k kVar = iVar.b;
            String str = iVar.a;
            p pVar = this.a;
            c.c.b.b.d.k.a aVar = (c.c.b.b.d.k.a) kVar.e.remove(str);
            if (aVar != null) {
                aVar.c = pVar.c;
                aVar.a = pVar;
                kVar.f.put(str, aVar);
                kVar.g.postDelayed(new j(kVar, str), (long) kVar.c);
            }
        }
    }

    public i(k kVar, String str) {
        this.b = kVar;
        this.a = str;
    }

    public void a(p<Bitmap> pVar) {
        this.b.a.execute(new a(pVar));
    }

    public void b(p<Bitmap> pVar) {
        this.b.a.execute(new b(pVar));
    }
}
